package com.xw.hchat;

import com.xw.hchat.util.IdWorker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * springBoot启动类
 * @ClassName Application
 * @Author liu zhiyong
 * @Date 2020/8/17 17:44
 * @Version 1.0
 */
@SpringBootApplication
@MapperScan(basePackages = "com.xw.hchat.mapper")
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class);
    }

    //注入id生成器
    @Bean
    public IdWorker idWorker(){
        return new IdWorker(0, 0);
    }

}
